package com.aspose.cells;

import java.util.ArrayList;

public class ErrorCheckOption {
   ArrayList a = new ArrayList();
   int b;

   public boolean isErrorCheck(int errorCheckType) {
      return (this.b & errorCheckType) == 0;
   }

   public void setErrorCheck(int errorCheckType, boolean isCheck) {
      if (isCheck) {
         this.b &= ~errorCheckType;
      } else {
         this.b |= errorCheckType;
      }

   }

   public int getCountOfRange() {
      return this.a.size();
   }

   public int addRange(CellArea ca) {
      com.aspose.cells.b.a.a.ze.a(this.a, (Object)ca);
      return this.a.size() - 1;
   }

   public CellArea getRange(int index) {
      if (index >= 0 && index < this.a.size()) {
         return (CellArea)this.a.get(index);
      } else {
         throw new CellsException(6, "Invalid range index");
      }
   }

   public void removeRange(int index) {
      if (index >= 0 && index < this.a.size()) {
         this.a.remove(index);
      } else {
         throw new CellsException(6, "Invalid range index");
      }
   }
}
